# coding:utf-8

import os
import sys
import gensim
from manage import model

__author__ = "Xcz"

reload(sys)
sys.setdefaultencoding('utf8')

curPath = os.path.dirname(__file__)

filePath = os.path.join(curPath, 'vectors10G.bin')


def Getsimwords(i):
    # model = gensim.models.KeyedVectors.load_word2vec_format(filePath, binary=True)
    simwords = model.most_similar(positive=i.decode('utf-8'), topn=3)
    return simwords

if __name__ == "__main__":
    for i in Getsimwords('通告'):
        print i
        print i[0]

